import request from '@/utils/request'

// 创建生产历史
export function createProHis(data) {
  return request({
    url: '/water/pro-his/create',
    method: 'post',
    data: data
  })
}

// 更新生产历史
export function updateProHis(data) {
  return request({
    url: '/water/pro-his/update',
    method: 'put',
    data: data
  })
}

// 删除生产历史
export function deleteProHis(id) {
  return request({
    url: '/water/pro-his/delete?id=' + id,
    method: 'delete'
  })
}

// 获得生产历史
export function getProHis(id) {
  return request({
    url: '/water/pro-his/get?id=' + id,
    method: 'get'
  })
}

// 获得生产历史分页
export function getProHisPage(query) {
  return request({
    url: '/water/pro-his/page',
    method: 'get',
    params: query
  })
}

// 导出生产历史 Excel
export function exportProHisExcel(query) {
  return request({
    url: '/water/pro-his/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
